package com.sfjswl.fp.core.base;

import com.sfjswl.fp.common.enums.NodeRunStateEnum;
import com.sfjswl.fp.core.context.RuleContext;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;

@Data
@Slf4j
@EqualsAndHashCode(callSuper = true)
public abstract class BaseLeaf extends BaseNode {

  @Override
  protected NodeRunStateEnum processNode(RuleContext ctx) {
    return doLeaf(ctx);
  }


  protected abstract NodeRunStateEnum doLeaf(RuleContext ctx);

  public void afterPropertiesSet() {
  }
}
